/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-08-05 09:31:57
 * @LastEditTime: 2023-03-09 11:33:44
 */
import { lazy } from 'react';
import Layout from '@/layout';
import lazyLoad from '../components/lazyLoad';

export const SearchAdvance = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/Advance/AdvanceMain')
);

export const SearchResult = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/SearchResult/SearchResultMain')
);
export const FullText = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/FullText/FullTextMain')
);
export const RelevanceSearch = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/RelevanceSearch/RelevanceSearch')
);
export const EntrySearch = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/EntrySearch/EntrySearchMain')
);
export const ImageSearch = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/ImageSearch/ImageSearchMain')
);
export const ImageResult = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/ImageResult/ImageResultMain')
);
export const AudioSearch = lazy(
  () => import(/* webpackChunkName: "Search" */ '@/view/retrieval/AudioSearch/AudioSearchMain')
);
const searchRoutes: any[] = [
  {
    path: '/retrieval',
    element: <Layout />,
    hidden: true,
    meta: {
      title: '档案检索'
    },
    children: [
      {
        path: 'entry-search',
        element: lazyLoad(EntrySearch),
        hidden: true,
        meta: {
          title: '条目检索'
        }
      },
      {
        path: 'full-text',
        element: lazyLoad(FullText),
        hidden: true,
        meta: {
          title: '全文检索'
        }
      },
      {
        path: 'advance',
        hidden: true,
        element: lazyLoad(SearchAdvance),
        meta: {
          title: '高级检索'
        }
      },
      {
        hidden: true,
        path: 'relevance-search',
        element: lazyLoad(RelevanceSearch),
        meta: {
          title: '关联检索'
        }
      },
      {
        hidden: true,
        path: 'image-search',
        element: lazyLoad(ImageSearch),
        meta: {
          title: '图像检索'
        }
      },
      {
        hidden: true,
        path: 'audio-search',
        element: lazyLoad(AudioSearch),
        meta: {
          title: '音视频检索'
        }
      },
      {
        path: 'another-result',
        element: lazyLoad(SearchResult),
        hidden: true,
        meta: {
          title: '检索结果'
        }
      },
      {
        path: 'image-result',
        element: lazyLoad(ImageResult),
        hidden: true,
        meta: {
          title: '检索结果'
        }
      }
    ]
  }
];

export default searchRoutes;
